#geno=chr8_snps_selected_region
geno=merged
awk '{print $2,$2}' "$geno.tfam" | awk '{printf "%s ",$0}' | sed 's/^/I id /' | awk '{printf "%s\n",$0}' > $geno.bgl
awk '{print $6,$6}' "$geno.tfam" | awk '{printf "%s ",$0}' | sed 's/^/A aff /' | awk '{printf "%s\n",$0}' >> $geno.bgl
sed 's/^\S* /M /' "$geno.tped" | cut -d ' ' -f1,2,5- >> $geno.bgl
gzip $geno.*

